package com.example.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * @Author: ft
 * @Date:2025/8/20
 * @Description: 相关单据：
 */
@Component
public class TokenInterceptor implements RequestInterceptor {
    /**
     * 给openfeign所有请求添加请求头
     * @param requestTemplate
     */
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("token", "your-token-value");
    }
}